<?php

/**
 * Created by Reliese Model.
 */

namespace App\Models\Base;

use Carbon\Carbon;
use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * Class WorkTicketTransfer
 *
 * @property int $id
 * @property int $work_ticket_id 工单id
 * @property int $from_work_user_id 转接前维护人员id
 * @property int $to_work_user_id 转接后维护人员id
 * @property string|null $remark 转接备注
 * @property int $status 状态|100:待接受,101:已接受,102:已拒绝
 * @property \Illuminate\Support\Carbon|null $accept_at 接受时间
 * @property \Illuminate\Support\Carbon|null $reject_at 拒绝时间
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @property \Illuminate\Support\Carbon|null $deleted_at
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketTransfer newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketTransfer newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketTransfer onlyTrashed()
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketTransfer query()
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketTransfer whereAcceptAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketTransfer whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketTransfer whereDeletedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketTransfer whereFromWorkUserId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketTransfer whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketTransfer whereRejectAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketTransfer whereRemark($value)
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketTransfer whereStatus($value)
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketTransfer whereToWorkUserId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketTransfer whereUpdatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketTransfer whereWorkTicketId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketTransfer withTrashed()
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketTransfer withoutTrashed()
 * @mixin \Eloquent
 */
class WorkTicketTransfer extends Model
{
	use SoftDeletes;
	use HasDateTimeFormatter;
	const ID = 'id';
	const WORK_TICKET_ID = 'work_ticket_id';
	const FROM_WORK_USER_ID = 'from_work_user_id';
	const TO_WORK_USER_ID = 'to_work_user_id';
	const REMARK = 'remark';
	const STATUS = 'status';
	const ACCEPT_AT = 'accept_at';
	const REJECT_AT = 'reject_at';
	const CREATED_AT = 'created_at';
	const UPDATED_AT = 'updated_at';
	const DELETED_AT = 'deleted_at';
	protected $table = 'work_ticket_transfers';

	protected $casts = [
		self::ID => 'int',
		self::WORK_TICKET_ID => 'int',
		self::FROM_WORK_USER_ID => 'int',
		self::TO_WORK_USER_ID => 'int',
		self::STATUS => 'integer',
		self::ACCEPT_AT => 'datetime',
		self::REJECT_AT => 'datetime',
		self::CREATED_AT => 'datetime',
		self::UPDATED_AT => 'datetime'
	];
}
